The present invention relates to a novel architecture for a microprocessor or microcomputer which offers an easy solution to the problems raised by automatic programming.
By automatic programming is meant all the possible ways which one program has of modifying another program. If a program P.sub.1 is likened to a set of functions f.sub.i such that P.sub.1 =(f.sub.1, f.sub.2, . . . f.sub.i . . . f.sub.j), automatic programming has been achieved if f.sub.i is a sub-program capable of modifying the sub-program f.sub.j. In this way program P.sub.1 is converted into a program P.sub.2 such that P.sub.2 =(f.sub.1, f.sub.2 . . . f.sub.i . . . g.sub.j). This characteristic can be extended step by step so that the entire program can be modified to perform jobs which are planned but which are entirely different from those defined by the original functions. Program P.sub.1 thus evolves with time as a function of its own past history.
Automatic programming may give rise to extremely complex problems since it is necessary to predict in advance all the possible changes which the program may make in itself, although in many applications the possible changes in the program as a function of events are perfectly predictable.
In large data processing systems which employ large processors, automatic programming may lead to the use of memory space which is able to expand in step with the evolution in time of the original program. In cases where, in certain applications of microprocessors, the size of the memory is small, it is desirable that the original program, when evolved, should not take up any more memory space than at the beginning. One way of achieving this result comprises making changes in the content of the instructions or data at specific addresses in the original program, which changes may for example affect the contents of the zone for the operation code of a particular instruction in the original program. Thus, an original program P.sub.1 which, at an address 10A, contains an instruction including an addition operation code could have its operation code converted into a subtraction code without the size of the original program being thereby altered. Similarly, an immediate operand may be altered to allow for a new value as a function of an event. It will be recalled that the operand field of an instruction contains an immediate operand when its content relates to an item of data and not to an address. This operand may be situated in an immediate instruction, but it may equally well form part of the permanent input data of the program. Thus, depending upon the change made to an immediate operand, the actions undertaken by the program will be different in the aftermath.
The technique of automatic programming may find highly diversified applications in systems which are tending to replace cash such as bank notes and coins, in systems where the completeness and confidentiality of information held in files must be ensured, in data processing systems where it is necessary to ensure that a program cannot be violated by external events, to allow specific functions to be performed on any programmable machine, in particular on computers or sophisticated small calculators, or in systems where access authorization and control are necessary. Thus, in a banking application, it may be necessary to memorize in succession the transactions performed on an account, to provide automatic protection against illicit access to the data on the memorized account, to control access to a memory device in which this data is situated by comparing a code with an item of data unavailable to an unauthorized user, and to modify the behavior of the memory device in relation to its external environment as a function of the history of the events which take place during the whole period over which it is used.
The arrangement according to the invention provides a solution to the difficult problem of storing the programs which are recorded in small programmable computers. There are in fact known designs of small computers which can be programmed by the user, but the chief drawback of these is that they are unable to preserve the recorded program in the absence of a power supply or energy source. This is why it is necessary to couple these computers, at the time of use, to recording media such as magnetic cards or fused memories from which the data which they contain can only be read out. In the existing state of the art these memories are known by the term Read Only Memory (ROM) and as low consumption Complementary Metal Oxide Semiconductor (CMOS) memories. These recording media are bulky, impractical and relatively expensive. The arrangement according to the invention solves these problems. Permanently recorded in a memory is a program which relates to the basic functions (the arithmetic function and conventional calculating function) of the small computer and a program which automatically translates into suitable program instructions functions which are fed in from the keyboard of the small computer by the user. Recorded in a reprogrammable memory portion or block are the various programs which are fed in by the user as a function of his needs and which evolve with time.
From the examples of applications which have just been given, it can be deduced that the corresponding memory arrangements need on the one hand to have very small physical dimensions and on the other hand to be provided with memory devices to preserve the data which is permanently recorded. The present day microprocessors which are produced by Large Scale Integration (LSI) techniques satisfy the first criterion of small size which is laid down in the above-mentioned applications. However, the monolithic structure usually contains only the control elements and the calculating elements which allow arithmetic and logic functions to be performed. Generally, the memory devices comprise another monolithic structure connected to the microprocessor. Practical examples of such microprocessors may be found in the book entitled "Les microprocesseurs, Techniques et applications" by Rodnay Zaks and Pierre Le Beux published by "SYBEX" 313 rue Lecourbe, 75015 PARIS.
Thus, if conventional means are used, to produce an automatically programmed memory device it is necessary to have at least one semiconductor chip on which are formed the structures of an arithmetic and logic unit and of a control member, and another chip on which the memory device is formed. The two chips are associated by means of a connection whose dimensions are by no means negligible as compared with the size of the two chips and associating them militates against satisfying the criterion of small size which was mentioned above. The conventional memory which is used is intended to receive one or more programs as well as data; access to these programs and data being obtained by means of an address register which is used to indicate the location of an instruction or item of data in the memory, and by means of an output register which is loaded with the instruction or data item which is read from the memory at the address indicated by the address register.
In the applications mentioned above, it is important that it is possible to preserve the recorded information when supply voltage is withdrawn from the memory device. In addition, the need to modify the information (instructions and data) already memorized naturally leads to the use of non-volatile writable memories. In effect, a program recorded in permanent, non-writable and non-erasable memory of the Read Only Memory (ROM) type cannot, because of the very nature of the memory, be altered. On the other hand, a writable memory of the Programmable Read Only Memory (PROM) type readily lends itself to the various applications envisaged above because it is non-volatile and its contents can be altered at any time. It will be recalled that a PROM memory is a ROM memory which can be programmed directly by the user. Each cell in the memory is equipped with a fuse and programming is performed by blowing fuses in the memory. Other reprogrammable memories of the Erasable Programmable Read Only Memory (EPROM) type produced by Metal Oxide Semiconductor (MOS) fabrication techniques may also be used. However, PROM and EPROM memories suffer from limitations insofar as the above mentioned applications are concerned.
The association of memories of these two kinds with a conventional microprocessor makes it necessary to place all the parts of the microprocessor in a quiescent state when a write voltage is fed to one of the memories, which voltage can only come from outside the microprocessor. This means that no program can be run during this phase. Such an association makes it impossible for the memory to be automatically programmed by the microprocessor because the ordinal counter which is responsible for addressing the memory cannot simultaneously point to an address A.sub.i in the memory whose content is to be modified and to another address A.sub.j in the same memory in order to execute a sequence of writing in the memory zone situated at address A.sub.i.